package ink.chow.jdbc.sharding.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ink.chow.jdbc.sharding.entity.CustomerTrack;
import ink.chow.jdbc.sharding.mapper.CustomerTrackMapper;
import ink.chow.jdbc.sharding.service.CustomerTrackService;

@Service
public class CustomerTrackServiceImpl implements CustomerTrackService {
	@Autowired
	private CustomerTrackMapper customerTrackMapper;
	
	@Override
	public void save(CustomerTrack customerTrack) {
		customerTrack.setDateCreate(new Date());
		customerTrackMapper.save(customerTrack);
	}

	@Override
	public CustomerTrack find(String id) {
		return customerTrackMapper.findUserById(id);
	}

	@Override
	public void modifyInfo(String id, String info) {
		customerTrackMapper.modifyInfo(id, info, new Date());
	}

}
